<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
/*******basic*******/
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('basic',$postdata);
		exi('设置成功');
	}
	$return['item']=$this->plugin_setting('basic');
	$hdps =array(
		array('title'=>'首页','picurl'=>'../addons/jy_weishop/resource/images/mobile-hdp01.jpg','action'=>'jy_seckill/index/'),
		array('title'=>'我的','picurl'=>'../addons/jy_weishop/resource/images/mobile-hdp02.jpg','action'=>'jy_weishop/member.index/'),
	);
	$footernav = array(
			array('title'=>'首页','icon'=>'icon-shouye','color'=>'#cc99ff','action'=>'jy_seckill/index/','image'=>'../addons/jy_weishop/resource/images/jy_weishoparticle.png'),
			array('title'=>'订单','icon'=>'icon-manageorder','color'=>'#66cc66','action'=>'jy_weishop/order.list/','image'=>'../addons/jy_weishop/resource/images/jy_fenleimsg.png'),
			array('title'=>'我的','icon'=>'icon-wo1','color'=>'#FF83FA','action'=>'jy_weishop/member.index/','image'=>'../addons/jy_weishop/resource/images/jy_fenleimsg.png'),
	);
	$return['item']['footernav'] = !empty($return['item']['footernav']) ? $return['item']['footernav'] : $footernav;
	$return['item']['hdps'] = !empty($return['item']['hdps']) ? $return['item']['hdps'] : $hdps;
	$htmls=array(
		'type'=>'edit',
		'desc'=>'参数设置',
		'edit_tab'=>true,
		'edits'=>array(
			array(
				'title'=>'基本信息',
				'list'=>array(
					array('type'=>'string','title'=>'平台名称','name'=>'title','help'=>'平台简称，字数最好在10字内：例如：短视频商城'),
					array('type'=>'string','title'=>'平台描述','name'=>'desc'),
					array('type'=>'unitstring','title'=>'秒杀最长时间','name'=>'maxhours','unit'=>'小时','help'=>'超出后，秒杀将结束！而不是到下一时间点或当天结束时间'),
					array('type'=>'string','title'=>'分享标题','name'=>'share_title'),
					array('type'=>'image','title'=>'分享图片','name'=>'share_image'),
					array('type'=>'string','title'=>'分享描述','name'=>'share_desc'),
				)
			),
			array(
					'title'=>'幻灯片',
					'list'=>array(
						array('type'=>'tip','title'=>'【温馨提示】：移步广告管理，添加广告，实现幻灯片展示！'),
					)
				),
			array(
							'title'=>'底部导航',
							'list'=>array(
								array('type'=>'array','name'=>'footernav','add_tip'=>'添加一个底部导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
								),
							)
				),
		),
	);
	$return['htmls']=$htmls;
	exi($return);
}
/*******basic*******/
/*******op*******/
